﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="DirectorioPersonas.aspx.cs" Inherits="DirectorioPersonas" ResponseEncoding="iso-8859-1" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <script type="text/javascript">
    // <![CDATA[
        function ShowLoginWindow() {
            popupDetalle.Show();
        }
        function ShowCreateAccountWindow() {
            pcCreateAccount.Show();
            tbUsername.Focus();
        }
    // ]]> 
    </script>
    <table width="100%">
        <tr>
            <td>
                <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" HeaderText="Directorio de Personas"
                    Width="100%" CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue"
                    EnableDefaultAppearance="False" GroupBoxCaptionOffsetY="-25px" SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                    <ContentPaddings Padding="2px" PaddingBottom="10px" PaddingTop="10px" />
                    <HeaderStyle>
                        <Paddings Padding="0px" PaddingBottom="7px" PaddingLeft="2px" PaddingRight="2px" />
                    </HeaderStyle>
                    <PanelCollection>
                        <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css"
                                CssPostfix="Office2003Blue" DataSourceID="SqlDataSource1" Width="100%">
                                <Columns>
                                    <dx:GridViewDataTextColumn FieldName="AGE_NOMBRES_APELLIDOS" Width="250px" ShowInCustomizationForm="True"
                                        VisibleIndex="0" FixedStyle="Left" CellStyle-BackColor="#ffffd6" Caption="Nombre">
                                        <CellStyle BackColor="#FFFFD6">
                                        </CellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataComboBoxColumn FieldName="Departamento" ShowInCustomizationForm="True"
                                        VisibleIndex="1">
                                        <PropertiesComboBox DataSourceID="SqlDataSourceDepartamentos" ValueField="DEPARTAMENTO"
                                            TextField="DEPARTAMENTO" ValueType="System.String" IncrementalFilteringMode="StartsWith"
                                            DropDownStyle="DropDown" />
                                    </dx:GridViewDataComboBoxColumn>
                                    <dx:GridViewDataTextColumn FieldName="Municipio" ShowInCustomizationForm="True" VisibleIndex="2">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Practica artística" FieldName="AGE_DESARROLLO_PRACTICA_ARTISTICA"
                                        ShowInCustomizationForm="True" VisibleIndex="3">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="AGE_MANERA_PRACTICA_ARTISTICA" ShowInCustomizationForm="True"
                                        VisibleIndex="4" Caption="Tipo">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Area" FieldName="ARD_AREA_ARTISTICA" ShowInCustomizationForm="True"
                                        VisibleIndex="5">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Tema" FieldName="AGE_OTRA_AREA_ARTISTICA_TEMA"
                                        ShowInCustomizationForm="True" VisibleIndex="6">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Correo" Width="250px" FieldName="AGE_CORREO_ELECTRONICO"
                                        ShowInCustomizationForm="True" VisibleIndex="7">
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <SettingsBehavior ColumnResizeMode="Control" />
                                <SettingsPager NumericButtonCount="20" PageSize="20">
                                </SettingsPager>
                                <Settings ShowHorizontalScrollBar="True" ShowFilterRow="True" ShowGroupPanel="True" />
                                <SettingsText GroupPanel="Arrastre AQUI los encabezados de las columnas para agrupar  la información" />
                                <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                    </LoadingPanelOnStatusBar>
                                    <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </Images>
                                <ImagesFilterControl>
                                    <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                    </LoadingPanel>
                                </ImagesFilterControl>
                                <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue">
                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                    </Header>
                                    <LoadingPanel ImageSpacing="10px">
                                    </LoadingPanel>
                                </Styles>
                                <StylesEditors>
                                    <ProgressBar Height="25px">
                                    </ProgressBar>
                                </StylesEditors>
                            </dx:ASPxGridView>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxRoundPanel>
            </td>
        </tr>
        <tr>
        <td>
        <dx:ASPxButton ID="btShowModal" runat="server" Text="Mostrar Detalle" 
                AutoPostBack="False" style="margin: 16px auto;" 
                CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                CssPostfix="Office2003Blue" 
                SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
            <ClientSideEvents Click="function(s, e) { ShowLoginWindow(); }" />
        </dx:ASPxButton>
            
        </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxPopupControl ID="popupDetalle" runat="server" CloseAction="CloseButton" Modal="True"  PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" HeaderText="Detalle" AllowDragging="True" CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css"
                    CssPostfix="Office2003Blue" EnableHotTrack="False" Height="400px" ClientInstanceName="popupDetalle"
 SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css"
                    Text="Detalles Persona" Width="500px">
                    <LoadingPanelImage Url="~/App_Themes/Office2003Blue/Web/Loading.gif">
                    </LoadingPanelImage>
                    <HeaderStyle>
                        <Paddings PaddingRight="6px" />
                    </HeaderStyle>
                    <ContentCollection>
                        <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="width: 129px">
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 129px">
                                            Nombre
                                        </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 129px">
                                        Dirección
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 129px">
                                        Telefono
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 129px">
                                        Ciudad
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SIPAConnectionString %>"
        SelectCommand="SELECT BAS_ZONAS_GEOGRAFICAS_1.ZON_NOMBRE AS Municipio, BAS_ZONAS_GEOGRAFICAS.ZON_NOMBRE AS Departamento, ART_AGENTES.AGE_NOMBRES_APELLIDOS, (CASE  ART_AGENTES_CARACTERISTICAS.AGE_DESARROLLO_PRACTICA_ARTISTICA WHEN 'S' THEN 'Si' WHEN 'N' THEN 'No' ELSE ART_AGENTES_CARACTERISTICAS.AGE_DESARROLLO_PRACTICA_ARTISTICA END) AS AGE_DESARROLLO_PRACTICA_ARTISTICA,  (CASE  ART_AGENTES_CARACTERISTICAS.AGE_MANERA_PRACTICA_ARTISTICA WHEN 'P' THEN 'Profesional' WHEN 'A' THEN 'Aficionado' ELSE ART_AGENTES_CARACTERISTICAS.AGE_MANERA_PRACTICA_ARTISTICA END) AS AGE_MANERA_PRACTICA_ARTISTICA, ART_AREA_ARTISTICAS.ARD_AREA_ARTISTICA, ART_AGENTES_CARACTERISTICAS.AGE_OTRA_AREA_ARTISTICA_TEMA, ART_AGENTES_UBICACION.AGE_CORREO_ELECTRONICO FROM BAS_ZONAS_GEOGRAFICAS INNER JOIN BAS_ZONAS_GEOGRAFICAS AS BAS_ZONAS_GEOGRAFICAS_1 INNER JOIN ART_AGENTES_CARACTERISTICAS INNER JOIN ART_AGENTES ON ART_AGENTES_CARACTERISTICAS.AGE_ID = ART_AGENTES.AGE_ID INNER JOIN ART_AREA_ARTISTICAS ON ART_AGENTES_CARACTERISTICAS.ARD_ID = ART_AREA_ARTISTICAS.ARD_ID INNER JOIN BAS_ZONAS_PAISES ON ART_AGENTES.ZOP_ID = BAS_ZONAS_PAISES.ZOP_ID INNER JOIN ART_AGENTES_UBICACION ON ART_AGENTES.AGE_ID = ART_AGENTES_UBICACION.AGE_ID ON BAS_ZONAS_GEOGRAFICAS_1.ZON_ID = ART_AGENTES_UBICACION.BAS_ZON_ID ON BAS_ZONAS_GEOGRAFICAS.ZON_ID = BAS_ZONAS_GEOGRAFICAS_1.ZON_PADRE_ID WHERE (ART_AGENTES.AGE_ESTADO = 'P') AND (ART_AGENTES_CARACTERISTICAS.ARD_ID = 16)">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSourceDepartamentos" runat="server" ConnectionString="<%$ ConnectionStrings:SIPAConnectionString %>"
        SelectCommand="SELECT ZON_NOMBRE AS DEPARTAMENTO FROM dbo.BAS_ZONAS_GEOGRAFICAS WHERE ZON_PADRE_ID IS NULL">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSourceMunicipios" runat="server" ConnectionString="<%$ ConnectionStrings:SIPAConnectionString %>"
        SelectCommand="SELECT ZON_NOMBRE AS MUNICIPIO FROM dbo.BAS_ZONAS_GEOGRAFICAS WHERE   ZON_PADRE_ID IS NOT NULL">
    </asp:SqlDataSource>
</asp:Content>
